#include<stdio.h>
#include<stdlib.h>

int main()
{

  int ca[4],sum=0;
  printf("Please input the values and spaces are used between values.\n");
  char card[4][4];
  int flag=0;
  while (scanf("%2s %2s %2s",card[1],card[2],card[3])!=EOF)
  {
    sum=0;
    flag=0;
    for(int i=1;i<=3;i++)
	{
      switch (card[i][0])
      {
        case 'J':
        case 'j':
        case 'Q':
        case 'q':
        case 'K':
        case 'k':
            ca[i] = 10;
            break;
        default:
          ca[i]=atoi(card[i]);
      }
      if(ca[i]==1)
        flag=1;
    }
    sum=ca[1]+ca[2]+ca[3];

    if(sum+10<=21 && flag)
	{
      sum+=10;
    }

    if(sum>21)
	{
      printf("%d You lose.\n",sum);
    }
    else{
      printf("Your sum:%d\n",sum);
    }
  }

  return 0;
}


